// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PUR_QUOTATION_ITEM
// * CreateDate    : 2014-02-18 18:04:11
// * Creater       : CodeSmith
// * LastChangeDate: 2014-02-18 18:04:11
// * LastChanger   : 2014-02-18 18:04:11
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Suzsoft.Smart.Data;
using ESOL.Common.Entity;

namespace ESOL.Business.Pur
{
/// <summary>
    /// PurQuotationItem
    /// </summary>
    public partial class PurQuotationItemBs
    {
        #region GetByID
        /// <summary>
        /// Get Entity
        /// </summary>
        /// <param name="objPurQuotationItemEntity">Entity</param>
        /// <returns>Entity</returns>
        public static PurQuotationItemEntity GetPurQuotationItem(PurQuotationItemEntity objPurQuotationItemEntity)
        {
            return DataAccess.SelectSingle<PurQuotationItemEntity>(objPurQuotationItemEntity);
        }
        #endregion


        #region Insert
        /// <summary>
        /// Insert Data
        /// </summary>
        /// <param name="objPurQuotationItemEntity">Entity</param>
        /// <returns>true Insert Succeed; false Insert Fail</returns>
        public static bool InsertPurQuotationItem(PurQuotationItemEntity objPurQuotationItemEntity)
        {
            return DataAccess.Insert(objPurQuotationItemEntity);
        }

        public static bool InsertPurQuotationItem(List<PurQuotationItemEntity> objPurQuotationItemEntityList)
        {
            return DataAccess.Insert(objPurQuotationItemEntityList);
        }
        #endregion


        #region Update
        /// <summary>
        /// Update Data
        /// </summary>
        /// <param name="objPurQuotationItemEntity">Entity</param>
        /// <returns>true Update Succeed; false Update Fail</returns>
        public static bool UpdatePurQuotationItem(PurQuotationItemEntity objPurQuotationItemEntity)
        {
            return DataAccess.Update(objPurQuotationItemEntity);
        }

        public static bool UpdatePurQuotationItem(List<PurQuotationItemEntity> objPurQuotationItemEntityList)
        {
            return DataAccess.Update<PurQuotationItemEntity>(objPurQuotationItemEntityList);
        }
        #endregion


        #region Delete
        /// <summary>
        /// Delete Data
        /// </summary>
        /// <param name="objPurQuotationItemEntity">Entity</param>
        /// <returns>true Delete Succeed; false Delete Fail</returns>
        public static bool DeletePurQuotationItem(PurQuotationItemEntity objPurQuotationItemEntity)
        {
            return DataAccess.Delete(objPurQuotationItemEntity);
        }

        public static bool DeletePurQuotationItem(List<PurQuotationItemEntity> objPurQuotationItemEntityList)
        {
            return DataAccess.Delete<PurQuotationItemEntity>(objPurQuotationItemEntityList);
        }
        #endregion


        #region GetAll
        /// <summary>
        /// Get All Data
        /// </summary>
        /// <returns>Back All Data<returns>
        public static DataSet GetPurQuotationItemAll()
        {
            return DataAccess.SelectAllDataSet<PurQuotationItemEntity>();
        }
        /// <summary>
        /// Get All Data List
        /// </summary>
        /// <returns>Back All Data List<returns>
        public static List<PurQuotationItemEntity> GetPurQuotationItemAllList()
        {
            return DataAccess.SelectAll<PurQuotationItemEntity>();
        }
        #endregion

        public static List<PurQuotationItemEntity> GetQuItemAllListByQuNo(string quNo)
        {
            if (string.IsNullOrEmpty(quNo))
                return null;
            return DataAccess.Select<PurQuotationItemEntity>(new PurQuotationItemEntity { QuNo = quNo });
        }

	}
	
	
}	

